package com.atguigu.daijia.driver.config;

import com.atguigu.daijia.driver.interctpeor.DriverInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author 山顶洞人郑某
 * @className WebMvcConfig.java
 * @date 2024 09 06
 */
@Component
public class WebMvcConfig implements WebMvcConfigurer {
    @Autowired
    private DriverInterceptor driverInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(driverInterceptor)
                .excludePathPatterns("/driver/login/{code}");
    }
}
